if (babl->fish.source == babl->fish.destination)
{
babl->fish.dispatch = babl_fish_memcpy_process;
+ babl->fish.data = (void*)&(babl->fish.data);
}
else
{
babl->fish.dispatch = babl_fish_reference_process;
+ babl->fish.data = (void*)&(babl->fish.data);
}
break;
/* lift out conversion from single step conversion and make it be the dispatch function
* itself
*/
- babl->fish.data = babl->fish_simple.conversion->data;
+ babl->fish.data = &babl->fish_simple.conversion->data;
babl->fish.dispatch = babl->fish_simple.conversion->dispatch;
}
else
/* do same short-circuit optimization as for simple fishes */
babl->fish.dispatch = conversion->dispatch;
- babl->fish.data = conversion->data;
+ babl->fish.data = &conversion->data;
}
else
{
babl->fish.dispatch = babl_fish_path_process;
+ babl->fish.data = (void*)&(babl->fish.data);
}
break;
Babl *babl = (void*)cbabl;
babl->fish.processings++;
babl->fish.pixels += n;
- babl->fish.dispatch (babl, source, destination, n, babl->fish.data);
+ babl->fish.dispatch (babl, source, destination, n, *babl->fish.data);
return n;
}
babl->fish.pixels += n * rows;
for (row = 0; row < rows; row++)
{
- babl->fish.dispatch (babl, (void*)src, (void*)dst, n, babl->fish.data);
+ babl->fish.dispatch (babl, (void*)src, (void*)dst, n, *babl->fish.data);
src += source_stride;
dst += dest_stride;
const Babl *source;
const Babl *destination;
void (*dispatch) (const Babl *babl, const char *src, char *dst, long n, void *data);
- void *data; /* user data */
+ void **data; /* user data - only used for conversion redirect */
double error; /* the amount of noise introduced by the fish */
/* instrumentation */